<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <style>
        .active {
            color: red;
        }
        
        li {
            cursor: pointer;
        }
    </style>
</head>

<body>
    <ul>
        <li>第1个li元素</li>
        <li>第2个li元素</li>
        <li class="active">第3个li元素</li>
        <li>第4个li元素</li>
    </ul>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script>
        var $active = $('.active');
        // 查找.acitve的兄弟元素
        var $brothers = $active.siblings();
        console.log('$brothers', $brothers);
    </script>
</body>

</html>